package com.icez.base_util_library.extension

import android.widget.ImageView
import com.icez.base_util_library.LoadImgUtil

/**
 *  加载图片
 * 
 * @author Icez
 * @param imgUrl 图片地址
 * @param placeholderId 图片没加载之前的图片
 * @param errorId 图片加载失败图片
 * @param fallbackId 图片地址为null的图片
 * @param sizeMultiplier 缩略图大小
 */
fun ImageView?.toSELoaadImage(
    imgUrl: String?,
    placeholderId: Int = 0,
    errorId: Int = 0,
    fallbackId: Int = 0,
    sizeMultiplier: Float = 0.8f
) {
    LoadImgUtil.instance.loadImg(
        this?.context,
        this,
        imgUrl,
        placeholderId,
        errorId,
        fallbackId,
        sizeMultiplier
    )
}